package p2p

import (
	"context"
	"strings"
	"sync"
)

//var ErrRefuse = errors.New("refuse")

func setDeviceId(sysInfo string, devId string) string {
	var par1 = sysInfo[0:len("(DevID){")]
	var par2 = sysInfo[len(par1):]
	return par1 + devId + par2
}
func setClientOnly(str string) string {
	var newStr = strings.ReplaceAll(str, "(ClientOnly){0}", "(ClientOnly){1}")
	return newStr
}

func StartP2PListen(ctx context.Context, devId string, clientOnly bool) error {
	return nil
}

var addrMap sync.Map

func AddConnect(peerId string, remotePort uint16, localPort uint16, timeout int) int {

	return 0
}

func RemoveConnect(peerid string, localPort uint16) int {
	return 0
}
